<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Latte Forum - Editor</title>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<link rel="stylesheet" href="/base.css">
	<link rel="stylesheet" href="/customer.css">
	<script src="/base.js"></script>
</head>
<body>
	<section class="top">
		<div class="view-width">
			<div class="top-nav-right">
				<% if(!ctrl.me_login) {%>
					<li><button onclick="show_box('l')" class="good-button-top" >Login</button></li>
					<li><button onclick="show_box('r')" class="good-button-top" >Rigist</button></li>
				<% }else {%>
					<a href=<%= "javascript:show_box('"+ctrl.me_id+"')" %> ><li><%= ctrl.me_nickname %></li></a>
				<% }%>
				<div id="login-box">
				</div>
			</div>
			<div class="top-nav-left">
				<li title="logo">LATTE FORUM 1.0</li>
			</div>
		</div>
	</section>
	<section class="banner">
		<div class="view-width">
			<div class="banner-nav-right">
				<li><input type="text" class="less-width-searcher"><button>search</button></li>
			</div>
			<div class="banner-nav">
				<a href="/">home</a> - 
			</div>
		</div>
	</section>
	<section class="main">
		<div class="view-width">
			<div class="editor-post-wrapper">
				<form class="editor-post" method="POST" action="/add_post" id="editor-post" onsubmit="return repost()">
					Add a post<hr>
					title: <br>
					<input type="text" name="title" title="edit post title"><br>
					topic: <br>
					<select name="topic" title="select post topic">
						<% for(var i in topic_list) {%>
							<option value=<%= topic_list[i] %> onclick="disable()"> <%= topic_list[i] %> </option>
						<% }%>
					</select><br>
					content: <br>
					<textarea name="content" cols="38" rows="8" title="edit post content" autofocus></textarea>
					<input type="submit" class="v-align-top">
					<p class="editor-tip">Tip: image url like this format '[[http://google.com/logo.png]]'</p>
					<p class="editor-tip" id="editor-post-tip"></p>
				</form>
			</div>

		</div>
	</section>
	<section class="foot">
		<div class="view-width">
			<p>LATTE FORUM 1.0 - Base on Express and MongoDB</p>
			<li><a href="" title="about">about</a></li>
			<li><a href="" title="link">link</a></li>
			<li><a href="" title="policy">policy</a></li>
		</div>
	</section>
</body>
</html>